function responseFormat(status, data) {
  if (status) {
    return {
      code: 200,
      msg: '查询成功!',
      data,
      success: true,
    };
  }
  return {
    code: 500,
    msg: '查询失败!',
    success: false,
  };
}
function responseHandleFormat(status, msg) {
  if (status) {
    return {
      code: 200,
      msg: msg ? msg : '操作成功!',
      success: true,
    };
  }
  return {
    code: 500,
    msg: msg ? msg : '操作失败!',
    success: false,
  };
}


module.exports = {
  responseFormat,
  responseHandleFormat,
};
